package com.sankuai.model;

import com.sankuai.annotaion.CheckParam;

import java.io.Serializable;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2022/1/18 0:21
 */

public class User implements Serializable {

    @CheckParam(notNull = true)
    private String username;

    @CheckParam(notNull = true)
    private int id;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public User(String username, int id) {
        this.username = username;
        this.id = id;
    }

    public User() {
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("User{");
        sb.append("username='").append(username).append('\'');
        sb.append(", id=").append(id);
        sb.append('}');
        return sb.toString();
    }
}